import fs from "fs";
import path from "path";

/**
 *
 * @param {*} projectRoot 工程本地的根目录
 * @returns
 */
export async function parseLocalProject(projectRoot) {
  const packageJsonPath = path.join(projectRoot, "package.json");
  const json = await fs.promises.readFile(packageJsonPath, "utf8");
  return JSON.parse(json);
}
